﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace NorthWindEmployees
{
    public partial class Details : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = int.Parse(Request.Params["id"]);
            Response.Write(id);

            NorthwindDataContext db = new NorthwindDataContext();
            var personInfo =
                from a in db.Employees
                where a.EmployeeID == id
                select a;

            DetailsViewPersonInfo.DataSource = personInfo;
            DetailsViewPersonInfo.DataBind();


        }

        protected void ButtonGoBack_Click(object sender, EventArgs e)
        {
            Response.Redirect("Default.aspx");
        }
    }
}